package com.jt.tenant.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;


import org.json.JSONObject;

@HttpInlet(Conn.INLET_GET_VERIFICATION)
public class GetVerificationCode extends JTAsyGet<GetVerificationCode.Info> {

    public String phone;

    public GetVerificationCode(String phone, AsyCallBack asyCallBack) {

        super(asyCallBack);

        this.phone = phone;

    }



    @Override
    protected Info parser(JSONObject object) {

        JSONObject apiTYF = object.optJSONObject("apiTYF");

        JSONObject head = apiTYF.optJSONObject("head");

        JSONObject body = apiTYF.optJSONObject("body");

        Info info = new Info();

        info.msg = head.optString("msg");

        info.returnCode =  body.optString("returnCode");

        info.flag = body.optString("flag");

        info.authCode = body.optString("authCode");

        return info;
    }

    public static class Info {

        public String msg;

        public String returnCode;

        public String flag;

        public String authCode;

    }

}
